import request from '@/utils/api'

export function getRoutes () {
  return request({
    url: '/routes',
    method: 'get'
  })
}

export function list (param) {
  return request({
    url: '/role/list',
    method: 'get',
    params: param
  })
}

export function listRole (param) {
  return request({
    url: '/role/listPage',
    method: 'get',
    params: param
  })
}

export function addRole (data) {
  return request({
    url: '/role',
    method: 'put',
    data
  })
}

export function updateRole (data) {
  return request({
    url: '/role',
    method: 'post',
    data
  })
}

export function deleteRole (data) {
  return request({
    url: '/role',
    method: 'delete',
    data
  })
}
